import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../Login.vue'
import Home from '../views/Home.vue'
import fpgl from '../views/myCenter/fpgl.vue'
import ddgl from '../views/myCenter/ddgl.vue'
import projectList from '../views/myProject/projectList.vue'
import main from '../views/main.vue'
import PasswordReset from '../views/PasswordReset.vue'
import Joke from '../views/Joke.vue'
import Weather from '../views/Weather.vue'
import wzsh from '../views/myCenter/Content.vue'
import zjgl from '../views/myCenter/expert.vue'
import addExpert from '../views/myCenter/addExpert.vue'
import showExpert from '../views/myCenter/showExpert.vue'
import index from '../views/index.vue'
import tzgg from '../views/tzgg.vue'
import wxLogin from '../wxLogin.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/index'
  },
  {
	 path:'/Login' ,
	 name:'Login',
	 component:Login
  },
  {
  	 path:'/wxLogin' ,
  	 name:'wxLogin',
  	 component:wxLogin
  },
  {
  	 path:'/index' ,
  	 name:'index',
  	 component:index
  },
  {
  	 path:'/tzgg' ,
  	 name:'tzgg',
  	 component:tzgg
  },
  {
	  path:'/PwdReset/:id/:username',
	  name:'PwdReset',
	  component:PasswordReset
  },
  {
	  path:'/mycenter',
	  name:'/mycenter',
	  component:main,
	  children:[
		  {
			  path:'fpgl',
			  component:fpgl
		  },
		  {
		  			  path:'ddgl',
		  			  component:ddgl
		  },
		  {
		  			  path:'joke',
		  			  component:Joke
		  },
		  {
		  			  path:'weather',
		  			  component:Weather
		  },
		  {
		  			  path:'wzsh',
		  			  component:wzsh
		  },
		  {
		  			  path:'zjgl',
		  			  component:zjgl
		  },
		  {
			  path:'addExpert',
			  component:addExpert
		  },
		  {
		  			  path:'showExpert',
		  			  component:showExpert
		  },
		  
	  ]
  },
  {
  	  path:'/myProject',
  	  component:main,
  	  children:[
  		  {
  			  path:'list',
  			  component:projectList
  		  },
  		 
  	  ]
  },
  
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
